package cn.mdmbct.douyin.basis.service;

import cn.mdmbct.douyin.basis.service.interfaces.SearchManagerService;
import cn.mdmbct.douyin.basis.service.interfaces.ToolAbilityService;
import cn.mdmbct.douyin.basis.service.interfaces.UserManagerService;
import cn.mdmbct.douyin.basis.service.interfaces.VideoManagerService;
import cn.mdmbct.douyin.common.proxy.ServicePath;
import cn.mdmbct.douyin.common.proxy.ServiceRepository;
import cn.mdmbct.douyin.common.session.DySession;

/**
 * @author mdmbct  mdmbct@outlook.com
 * @date 5/10/2021 22:02 PM
 * @modified mdmbct
 * @since 1.0
 */
public class ProxyDyBasisService implements DyBasisService, ServicePath {

    private final ServiceRepository serviceRepository;


    public ProxyDyBasisService(DySession dySession) {
        this.serviceRepository = dySession.getServiceRepository();
    }

    @Override
    public VideoManagerService getVideoService() {
        return serviceRepository.getDyService(VideoManagerService.class);
    }


    @Override
    public UserManagerService getUserManagerService() {
        return serviceRepository.getDyService(UserManagerService.class);
    }

    @Override
    public SearchManagerService getSearchManagerService() {
        return serviceRepository.getDyService(SearchManagerService.class);
    }

    @Override
    public ToolAbilityService getToolAbilityService() {
        return serviceRepository.getDyService(ToolAbilityService.class);
    }

    @Override
    public String serviceInterfacesPackage() {
        return " cn.mdmbct.douyin.basis.service.interfaces";
    }
}
